import os

# 配置参数
target_dir = r"E:\zhihao\2025文档\25年9月\红外报告\数据\第二阶段-样本精细化-0925\红外人像0917"  # 修改为你的目标文件夹路径
old_date = "2025-09-17"
new_date = "2025-09-19"

for root, dirs, files in os.walk(target_dir):
    for filename in files:
        if old_date in filename:
            old_path = os.path.join(root, filename)
            new_filename = filename.replace(old_date, new_date)
            new_path = os.path.join(root, new_filename)
            os.rename(old_path, new_path)
            print(f"重命名: {old_path} -> {new_path}")

print("批量重命名完成！")